<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<title>独手创作</title>
		<link href="../css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="../css/pullToRefresh.css" />
		<link rel="stylesheet" type="text/css" href="../fonts/iconfont/iconfont.css" />
		<link rel="stylesheet" type="text/css" href="../css/global.css" />
		<style type="text/css">
			.goods_list_a .item {
				width: calc(94%/2);
				margin: calc(6%/4);
				padding: calc(6%/4);
				float: left;
			}
			
			.goods_list_a .item img {
				/*max-height: 130px;*/
				height: 130px;
			}
			
			.goods_list_a .item span {
				font-size: 15px;
			}
			.good_intro{width: 100%;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2; }
		</style>
	</head>

	<body ng-app="app" ng-controller="goodsListController">
		<header class="mui-bar mui-bar-nav bg_white">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title colorP">{{name}}</h1>
		</header>
		<div class="mui-content">
			<!--<div class="width100  bg_white" style="display: none;">
				<ul class="filtrate mui-clearfix paddingl_r_15px_tb11px">
					<li>
						<span>销量</span>
						<div class="top_down">
							<i class="mui-icon iconfont">&#xe716;</i>
							<i class="mui-icon iconfont">&#xe6a5;</i>
						</div>
					</li>
					<li>
						<span>时间</span>
						<div class="top_down">
							<i class="mui-icon iconfont">&#xe716;</i>
							<i class="mui-icon iconfont">&#xe6a5;</i>
						</div>
					</li>
					<li>
						<span>价格</span>
						<div class="top_down">
							<i class="mui-icon iconfont">&#xe716;</i>
							<i class="mui-icon iconfont">&#xe6a5;</i>
						</div>
					</li>
					<li>
						<span>工期</span>
						<div class="top_down">
							<i class="mui-icon iconfont">&#xe716;</i>
							<i class="mui-icon iconfont">&#xe6a5;</i>
						</div>
					</li>
				</ul>
			</div>-->
			<p class="mui-text-center padding_tb20" ng-if="goods[0] == null"><i class="iconfont mui-icon font60">&#xe6e3;</i><br /><br />没有更多内容~</p>
			<ul class="goods_list_a width100 mui-clearfix" ng-repeat="(index,vo) in goods">				
				<li class="item  bg_white" ng-click="open(x.uid,1,x.id)" ng-repeat="(index,x) in vo">
					<img ng-src="{{x.good_image}}" />
					<span class="mui-ellipsis">{{x.good_name}}</span>
					<p class="good_intro" style="height: 40px; overflow: hidden;">{{x.good_intro}}</p>
					<div class="color333 mui-clearfix">
						<span class="mui-pull-left font12">工期：<i>{{x.maf_time}}</i>天</span>
						<span class="mui-pull-right colorRed">￥<i>{{x.price}}</i></span>
					</div>
				</li>
				
			</ul>
		</div>
	</body>
	<script src="../js/mui.min.js"></script>
	<script src="../js/open.js"></script>
	<script src="../js/mui.pullToRefresh.js"></script>
	<script src="../js/mui.pullToRefresh.material.js"></script>
	<script src="../js/jquery.min.js"></script>
	<script src="../js/apppublic.js"></script>
	<script src="../js/angular.js"></script>
	<script src="../js/app/DIY.js"></script>
	<script type="text/javascript">
		$('.top_down i').click(function() {
			$(this).addClass('colorP').siblings().removeClass('colorP');
		})
	</script>
	<script type="text/javascript">
		(function($) {
			//阻尼系数
			var deceleration = mui.os.ios ? 0.003 : 0.0009;
			$('.mui-scroll-wrapper').scroll({
				bounce: false,
				indicators: false, //是否显示滚动条
				deceleration: deceleration
			});
			$.ready(function() {
				//循环初始化所有下拉刷新，上拉加载。
				$.each(document.querySelectorAll('.mui-content'), function(index, pullRefreshEl) {
					$(pullRefreshEl).pullToRefresh({
						down:{
							callback: function() {
								var self = this;
								setTimeout(function() {
									loadNews();
									self.endPullDownToRefresh();
								}, 1000);
							}
						},
						up: {
							callback: function() {
								var self = this;
								getValue();
								setTimeout(function() {
									self.endPullUpToRefresh();
								}, 1000);
							}
						}
					});
				});
			});
		})(mui);
		function loadNews() {
			var ws = plus.webview.currentWebview();
			appElement = document.querySelector('[ng-controller=goodsListController]');
			$scope = angular.element(appElement).scope();
			res = []
			$scope.name = ws.name;
			cid = ws.type;
			cur_page = 1;
			$scope.initView();
			$scope.$apply();
		}
		function getValue() {
			var ws = plus.webview.currentWebview();
			appElement = document.querySelector('[ng-controller=goodsListController]');
			$scope = angular.element(appElement).scope();
			$scope.name = ws.name;
			cid = ws.type;
			cur_page++;
			$scope.initView();
			$scope.$apply();	
		}
	</script>
</html>